package com.linkage.educloud.ah.http;

import com.google.gson.Gson;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;

/**
 * <desc>
 * Created by The Moss on 2018/8/14.
 */

public class ResponseInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        Response response = chain.proceed(request);
        response.body().toString();
        response.newBuilder().body(ResponseBody.create(response.body().contentType(),new Gson().toJson(""))).build();
        return null;
    }
}
